package system.student.funtion.exhibition.adminfunction.impl;


import system.student.entity.Clazz;
import system.student.entity.Dept;
import system.student.entity.Clazz;
import system.student.entity.user.Teacher;
import system.student.funtion.exhibition.adminfunction.TeacherService;
import system.student.mapper.TeacherMapper;
import system.student.util.MapperUtil;

import java.util.List;
import java.util.Map;

public class TeacherServiceImpl implements TeacherService {
    private TeacherMapper teacherMapper = MapperUtil.getMapper(TeacherMapper.class);
    @Override
    public List<Teacher> selectAllTeacher() {
        return teacherMapper.selectAllTeacher();
    }

   @Override
   public List<Long>  selectAllTeacherUserId(){
        return teacherMapper.selectAllTeacherUserId();
   }

   @Override
   public Integer selectStateByUserId(Long userId){
        return teacherMapper.selectStateByUserId(userId);
   }

   @Override
    public void updateStateByUserId(Integer newState, Long userId) {
        teacherMapper.updateStateByUserId(newState, userId);
    }

    @Override
    public List<Teacher> selectAllTeacherId() {
        return teacherMapper.selectAllTeacherId();
    }

    @Override
    public List<Clazz> selectAllClassId() {
        return teacherMapper.selectAllClassId();
    }

    @Override
    public void insertTeacherIntoClass(Long teacherId, Long classId) {
        teacherMapper.insertTeacherIntoClass(teacherId, classId);
    }

    @Override
    public List<Dept> selectAllDeptId() {
        return teacherMapper.selectAllDeptId();
    }

    @Override
    public void insertTeacherIntoDept(Long teacherId, Long deptId ,String deptName) {
        teacherMapper.insertTeacherIntoDept(teacherId, deptId,  deptName);
    }

    @Override
    public String selectById(Long deptId) {
        return teacherMapper.selectById(deptId);
    }
}
